package com.gtq.uhome.controller;

import com.gtq.uhome.result.Result;
import com.gtq.uhome.service.AdministratorLoginService;
import com.gtq.uhome.service.SiteHomePageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

/**
 * 站点首页
 */
@Controller
@RequestMapping(value = "/siteHomePage")
@ResponseBody
@CrossOrigin
@Api(tags = "站点首页接口说明文档 咨询李龙")
public class SiteHomePageController {

    @Resource
    SiteHomePageService siteHomePageService;

    /**
     * 查询未审核和未派送的订单数
     * @return
     */
    @GetMapping
    @ApiOperation(value = "未审核和未派送的订单数", notes = "先咨询后调试，使用GET请求，返回notReviewed:未审核的订单数,notDelivered:未派送的订单数", response = Map.class, httpMethod = "GET")
    public Result selectNotFinished() {
        Map<String, Object> map = siteHomePageService.selectNotFinished();
        return Result.ok(map);
    }


}
